home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 61 < prev    next >
Encoding:
Text File  |  1996-08-06  |  2.2 KB  |  48 lines

  1. Newsgroups: comp.std.c
  2. Path: blackbush.xlink.net!slsv6bt!slsv6bt!kanze
  3. From: kanze@lts.sel.alcatel.de (James Kanze US/ESC 60/3/141 #40763)
  4. Subject: Re: sizeof(1L) in preprocesor;How to tell sizeof(double)>sizeof(long) ?
  5. In-Reply-To: nmm1@cus.cam.ac.uk's message of 9 Jan 1996 11:39:50 GMT
  6. Message-ID: <KANZE.96Jan9135752@slsvewt.lts.sel.alcatel.de>
  7. Sender: news@lts.sel.alcatel.de
  8. Organization: SEL
  9. References: <sc3f9vb6gk.fsf@lns101.lns.cornell.edu> <1996Jan5.094122.16151@sq.com>
  10.     <vyzd98ug7w4.fsf@lamothe.informatik.uni-dortmund.de>
  11.     <tuent98zl4.fsf@nemo.bedford.waii.com> <4ctk66$57j@lyra.csx.cam.ac.uk>
  12. Date: 09 Jan 1996 12:57:52 GMT
  13.  
  14. In article <4ctk66$57j@lyra.csx.cam.ac.uk> nmm1@cus.cam.ac.uk (Nick
  15. Maclaren) writes:
  16.  
  17. |> In article <tuent98zl4.fsf@nemo.bedford.waii.com>, gsez020@nemo.bedford.waii.com (Pete Forman) writes:
  18. |> |> >>>>> "Andreas" == Andreas Schwab <schwab@lamothe.informatik.uni-dortmund.de> writes:
  19. |> |> >>>>> "Mark" == Mark Brader <msb@sq.com> writes:
  20. |> |> 
  21. |> |>     Mark>    #if LONG_MAX * DBL_EPSILON > 1
  22. |> |> 
  23. |> |>     Andreas> This doesn't work as floating point numbers aren't
  24. |> |>     Andreas> allowed in #if expressions.
  25. |> |> 
  26. |> |> Try changing to something like
  27. |> |> 
  28. |> |>     #if LONG_MAX >> DBL_MANT_DIG > 1
  29.  
  30. |> Don't bother - the 'constants' in <float.h> aren't!  This is a specific
  31. |> exclusion to make life easier for systems with separate floating-point
  32. |> processors, and makes <float.h> almost useless for numerical analysts.
  33.  
  34. |> I tried to get this imbecility (and it IS an imbecility) fixed, but I
  35. |> failed.  So any portable library of mathematical functions has to define
  36. |> its own system-dependent constants, and can use <float.h> only for
  37. |> comparison :-(
  38.  
  39. Is this true for all of the ``constants'' in float.h, or only some of
  40. them?  I don't have my C standard here to check, but I thought that
  41. this was only true of the constants whose type was non-integral.
  42. --
  43. James Kanze         Tel.: (+33) 88 14 49 00        email: kanze@gabi-soft.fr
  44. GABI Software, Sarl., 8 rue des Francs-Bourgeois, F-67000 Strasbourg, France
  45. Conseils, Θtudes et rΘalisations en logiciel orientΘ objet --
  46.                 -- A la recherche d'une activitΘ dans une region francophone
  47.  
  48.